package com.zbkj.crmeb.category.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zbkj.crmeb.enums.CategoryTypeEnum;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_category_match")
public class CategoryMatch extends Model<CategoryMatch> {
    private static final long serialVersionUID = 1L;

    @JsonProperty(value = "id")
    @TableId(value = "id",type = IdType.INPUT)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "父级ID")
    private Integer pid;

    @ApiModelProperty(value = "路径")
    private String path;

    @ApiModelProperty(value = "分类名称")
    private String name;
    
    @ApiModelProperty(value = "英文名")
    private String enName;
    
    @ApiModelProperty(value = "意大利名")
    private String itName;

    @ApiModelProperty(value = "地址")
    private String url;

    @ApiModelProperty(value = "扩展字段")
    private String extra;

    @ApiModelProperty(value = "状态, 0正常，1失效")
    private Boolean status;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "推荐首页(0:不推荐 1:推荐)")
    private Integer isAdvice;
    
    /**
     * 类目id
     */
    @JsonProperty(value = "category_id")
    @ApiModelProperty(value = "寻物类目id")
    private Integer categoryId;
    
    /**
     * 类目名称
     */
    @JsonProperty(value = "category_name")
    @ApiModelProperty(value = "寻物类目名称")
    private String categoryName;
    
    /**
     * 类目类型: 1: 寻物 2: eur 3: buyer 4: tmall
     */
    @JsonProperty(value = "type")
    @ApiModelProperty(value = "类目类型: 1: 寻物 2: eur 3: buyer 4: tmall")
    private CategoryTypeEnum type;
    
    /**
     * 下游类目id
     */
    @JsonProperty(value = "oth_category_id")
    @ApiModelProperty(value = "下游类目id")
    private String othCategoryId;
    
    /**
     * 下游类目名称
     */
    @JsonProperty(value = "oth_category_name")
    @ApiModelProperty(value = "下游类目名称")
    private String othCategoryName;
    
    /**
     * 下游类目类型
     */
    @JsonProperty(value = "oth_category_type")
    @ApiModelProperty(value = "下游类目类型")
    private String othCategoryType;
    
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd  HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "规格id,多个用逗号隔开")
    private String productRuleIds;

    @ApiModelProperty(value = "商品信息id，多个用逗号隔开")
    private String informationIds;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @ApiModelProperty(value = "意大利头层费用")
    private BigDecimal itFirst;

    @ApiModelProperty(value = "香港头层费用")
    private BigDecimal hkFirst;
}
